<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	//算月份天数:
	//1,3,5,7,8,10,12 =>31天
	//4,6,9,11, =>30天  
	// 2 => 28 || 29天

	var month = parseInt(prompt('请输入月份'));

	switch(month){
		//直接可以多条件多待检测值一起写
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
			//多个检测只有一个相同结果
			alert('这个月有31天');
			break;
		case 4:
		case 6:
		case 9:
		case 11:
			alert('这个月有30天');
			break;
		case 2:
			alert('这个月可能是28天也可能是29天');
			break;
	}
</script>
